package com.dashen.general.server.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;
import java.util.List;

/**
 * @author Barry Wang
 */
@Controller
public class WelcomeController {

    @RequestMapping("welcome/home")
    @ResponseBody
    public String home(){
        return "this is home page";
    }

    @RequestMapping("/")
    @ResponseBody
    public String root(){
        return "this is root page";
    }


    public static void main(String[] args){
        String str = "a,b,c";
        List<String> result = Arrays.asList(str.split(","));
        System.out.println(result);

        String str1 = "";
        List<String> result1 = Arrays.asList(str1.split(","));
        System.out.println(result1);
    }
}
